home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / PASCSRC.ZIP / LABELS.PAS < prev    next >
Pascal/Delphi Source File  |  1988-01-15  |  580b  |  27 lines

  1.                                 (* Chapter 6 - Program 5 *)
  2. program Label_Illustration;
  3.  
  4. label 274,Repeat_Loop,Help,Dog;
  5.  
  6. var Counter : byte;  (* This limits us to a maximum of 255 *)
  7.  
  8. begin
  9.    Writeln('Start here and go to "help"');
  10.    goto Help;
  11.  
  12. Dog:
  13.    Writeln('Now go and end this silly program');
  14.    goto 274;
  15.  
  16. Repeat_Loop:
  17.    for Counter := 1 to 4 do Writeln('In the repeat loop');
  18.    goto Dog;
  19.  
  20. Help:
  21.    Writeln('This is the help section that does nothing');
  22.    goto Repeat_Loop;
  23.  
  24. 274:
  25.    Writeln('This is the end of this spaghetti code');
  26. end.
  27.